﻿{%if pros%}
    {%for pro in pros%}
	<a href='buy/?proid={{pro.id}}'></a>  <!-- (r'^buy/$',view.buy)-->
	{%endfor%}
{%else%}
图书不存在
{%endif%}
<!--
def buy(request):
    id=request.GET.get('proid',none)
	if id>0:
	    pros=book.objects().all().get(id=id)
		request.session['proc']=pros
		return render_to_response('showbuy.html',{context_instance=RequestContext(request)})


    return render_to_response('showbuy.html')
	
cart.html 中request.session.pro

配置templates_context_processes
-->